/**
 * 功能描述
 */
define(function (require, exports, module) {
    //引入视图基类
    var ELView = require("elview");

    //assets
    var template = require("./assets/tpl/welfareconsupon_main.tpl");
    require("./assets/css/welfareconsupon_main.css");

    //business

    //component
    var welfareSubnavComp = require("./component/welfareSubnavComp");
    var welfareGridComp = require("./component/welfareGridComp");
    var welfareEditGridComp = require("./component/welfareEditGridComp");
    var gridmxEvents = require("./handler/gridmxEvents");
//    var welfareDetailGridComp = require("./component/welfareDetailGridComp");
//    var welfareFormComp = require("./component/welfareFormComp");
    //constant

    //handler

    //store

    var welfareconsupon_main = ELView.extend({
        attrs: {
            template: template
        },
        initComponent: function (params, widget) {
        	welfareSubnavComp.initComponent(params, widget);
        	welfareGridComp.initComponent(params, widget);
        	welfareEditGridComp.initComponent(params, widget);
        	gridmxEvents.gridMx(params, widget);
//        	welfareDetailGridComp.initComponent(params, widget);
//        	welfareFormComp.initComponent(params, widget);
        },
        afterInitComponent: function (params, widget) {
        	widget.get("detailgrid").hide();
	       	/* widget.get("subnav").load("servicePoint",{
	          	callback: function(ret){
	          		widget.get("grid").refresh();
	          	}
	         });*/
            
        }
    });

    module.exports = welfareconsupon_main;
});
